home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 2
/
United Public Domain Gold 2.iso
/
utilities
/
pu063.dms
/
pu063.adf
/
HamLabDemo
/
Rexx
/
auto.hl
next >
Wrap
Text File
|
1992-09-05
|
1KB
|
79 lines
/* HamLab Plus AREXX Script
*
* This script opens a file, picks a display mode based on the input size,
* and displays it
*
* Ed Hanway
* 26 June 1992
*/
arg fname
/* Attempt to open a file */
if fname == "" then do
'open'
end; else do
'open filename' fname
end
if rc > 5 then do
'message "Open problem"'
exit
end
/* get some info about it */
'GETATTR INPUT STEM INP'
if inp.width > 384 then do
'resolution high lace'
end; else do
'resolution low lace'
end
select
/* for one bitplane picture, assume black & white */
when inp.depth = 1 then do
'message "Black & white picture..."'
'cache24bit mem 0'
'cache12bit mem 0'
'dither none'
'dither2 none'
'onestep false'
'bitplanes 1'
'palmode fixed'
end
/* probably displayable without lots of analysis */
when (inp.depth > 1) & (inp.depth <= 4) then do
'message "Small palette picture..."'
'cache24bit mem 0'
'cache12bit mem -1'
'dither none'
'dither2 none'
'onestep false'
x = inp.depth
'bitplanes' inp.depth
'palettemode normal'
end
otherwise do
'message "Large palette picture..."'
'cache24bit mem -1'
'cache12bit mem 0'
'dither none'
'dither2 floyd'
'onestep true'
if(inp.width > 384) then do
'bitplanes 4'
end; else do
'bitplanes ham'
end
'palettemode normal'
end
end
'display'